public class demo10 {
    public static void main(String[] args) {
        char[] a={'A','B','C','D'};
        int count=0;
        for (int i=0;i<a.length;i++){
            for (int j=0;j<a.length;j++){
                for (int k=0;k<a.length;k++){
                    for (int y=0;y<a.length;y++){
                        count++;
                        System.out.println(a[i]+""+a[j]+""+a[k]+""+a[y]);
                    }
                }
            }
        }
        System.out.println("一个有"+count+"种");
    }
}
